package com.lagou.edu;

import com.alibaba.druid.pool.DruidDataSource;

import javax.sql.DataSource;

/**
 * @author 应癫
 */

public class SpringConfig {

    public String driverClassName = "com.mysql.cj.jdbc.Driver";
    public String url = "jdbc:mysql://39.106.128.18:3306/mybatistest";
    public String username = "mybatistest";
    public String password = "Zb@123456";

    public DataSource createDataSource(){
        DruidDataSource druidDataSource = new DruidDataSource();
        druidDataSource.setDriverClassName(driverClassName);
        druidDataSource.setUrl(url);
        druidDataSource.setUsername(username);
        druidDataSource.setPassword(password);
        return  druidDataSource;
    }
}
